# -*- python -*-
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Import('env')

if not env.AllowInlineAssembly():
  Return()

valgrind = env.ComponentObject(
    'valgrind_annotations.o',
    '${MAIN_DIR}/src/untrusted/valgrind/dynamic_annotations.c')

nexe = env.ComponentProgram(
    'syscall_return_regs_test', ['syscall_return_regs_test.c'] + valgrind,
    EXTRA_LIBS=['${NONIRT_LIBS}', 'test_common'])

node = env.CommandSelLdrTestNacl('syscall_return_regs_test.out', nexe)
env.AddNodeToTestSuite(node, ['small_tests'], 'run_syscall_return_regs_test')
